getFilesList = function(urlLoc, funName)
	{
	//this is a change
	if (!funName){funName=getFilesList.console};
	if (typeof(funName)!=='function'){throw('it has to be a function itself, not a function name')};
	
	//declare 'global' variables
	if( !getFilesList[urlLoc] ) {getFilesList[urlLoc] = new Object(); }
	
	//Here we go
	getFilesList.determineType(urlLoc, urlLoc);
	
	}
	
getFilesList.determineType = function( url, origin )
	{
	
	//ignore zipped files explicitally - these can throw errors
	if( url.match( /\.gz|\.zip|\.tar|\.md5/i ) ){;}
	
	//if it is a directory then continue the search
	else if( url.match( /\/$/ ) ){webScrapper.getURL( url, getFilesList.checkResults, origin );}
	
	//Save non zip and non-folder file locations
	else {getFilesList[origin][url.split( /\// ).pop()]=url;}
		
	return false;
	}

getFilesList.checkResults = function(pageObject, origin)
	{
	//kill if webpage does not exist
	if( pageObject.content.join("").match(/404 Not Found/)  ) {return false;}
	
	//else split up directory
	else{ getFilesList.getFolders(pageObject, origin); }
	
	return false;
	}	

getFilesList.getFolders = function( pageObject, origin )
	{
	
	//join array
	var pageString = pageObject.content.join("");
	
	//split on link references
	var regExp = /\<a.+?"(.+?)?".+?\>/g;
	
	//prime the loop
	var pageArr = new Array();
	var lastVal = regExp.exec( pageString );
	
	//get links
	while( lastVal )
		{
		pageArr.push(lastVal[1]);
		lastVal = regExp.exec( pageString );
		}
	
	//continue recursion
	for( var i in pageArr )
		{
		if( pageArr[i].match(/[^\d\w\\.\_\-/]/) ) {continue;}
		getFilesList.determineType(pageObject.url+pageArr[i], origin);
		}
	}
	
getFilesList.console = function(x) 
	{ 
	console.log("Goal achieved " + x +" found!!"); 
	}